<html>
<head><meta charset="utf-8"><title>rust-src on mac os · t-release · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/index.html">t-release</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/rust-src.20on.20mac.20os.html">rust-src on mac os</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="212643469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/rust-src%20on%20mac%20os/near/212643469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nick Cameron <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/rust-src.20on.20mac.20os.html#212643469">(Oct 08 2020 at 03:13)</a>:</h4>
<p>rust-src on mac os (current nightly) seems to only have llvm-project sub-directory, not rust (like it does on Linux). This breaks rust-analyzer and RLS. Is this a known issue?</p>



<a name="212644030"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/rust-src%20on%20mac%20os/near/212644030" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/rust-src.20on.20mac.20os.html#212644030">(Oct 08 2020 at 03:28)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="256841">@Nick Cameron</span> (miss you!).  <a href="https://static.rust-lang.org/dist/2020-10-08/rust-src-nightly.tar.xz">https://static.rust-lang.org/dist/2020-10-08/rust-src-nightly.tar.xz</a> appears to contain everything that is expected.  I recently added the llvm-project subdirectory, but it should be a sibling to the <code>library</code> directory.  That is, you should see <code>rust/src/llvm-project</code> and <code>rust/library</code>, and the most relevant stuff is in the <code>library</code> directory.</p>



<a name="212644237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/rust-src%20on%20mac%20os/near/212644237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nick Cameron <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/rust-src.20on.20mac.20os.html#212644237">(Oct 08 2020 at 03:33)</a>:</h4>
<p>Thanks <span class="user-mention" data-user-id="120518">@Eric Huss</span> ! Yeah, there is the library directory, it looks like rust-analyzer is using an incorrect suffix for the directory. I'll have to look to see if that is configurable..</p>



<a name="212644841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/rust-src%20on%20mac%20os/near/212644841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/rust-src.20on.20mac.20os.html#212644841">(Oct 08 2020 at 03:50)</a>:</h4>
<p>Hm, that's strange. It looks like it should use the correct path (<a href="https://github.com/rust-analyzer/rust-analyzer/blob/e95e666b106b2f63ab2b350e656c9e8b96441fa7/crates/project_model/src/sysroot.rs#L141-L148"><code>get_rust_src</code></a>).  Maybe it is somehow confused when both directories exist, but that code appears to do the right thing.  For reference, the change to rust-src was <a href="https://github.com/rust-lang/rust/issues/77086">#77086</a> which was about 2 weeks ago.</p>



<a name="212645007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/rust-src%20on%20mac%20os/near/212645007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Nick Cameron <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/rust-src.20on.20mac.20os.html#212645007">(Oct 08 2020 at 03:56)</a>:</h4>
<p>Yeah, I found get_rust_src, and I think that if both directories are present (which they are) bad things happen (or might happen, its not clear to me). In any case, I can workaround it by setting RUST_SRC_PATH to be the library version</p>



<a name="212680091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/241545-t-release/topic/rust-src%20on%20mac%20os/near/212680091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/241545-t-release/topic/rust-src.20on.20mac.20os.html#212680091">(Oct 08 2020 at 12:18)</a>:</h4>
<p>Cc <span class="user-mention" data-user-id="133169">@matklad</span> as well</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>